package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.AttendCalendarExample.E_ATTEND_PERIOD_JSON;
import static org.jsola.hr.example.AttendCalendarExample.E_ATTEND_PLAN_ID;
import static org.jsola.hr.example.AttendCalendarExample.E_COMPANY_ID;
import static org.jsola.hr.example.AttendCalendarExample.E_DATE_TYPE;
import static org.jsola.hr.example.AttendCalendarExample.E_DAY;
import static org.jsola.hr.example.AttendCalendarExample.E_MONTH;
import static org.jsola.hr.example.AttendCalendarExample.E_NEED_ATTEND;
import static org.jsola.hr.example.AttendCalendarExample.E_REASON;
import static org.jsola.hr.example.AttendCalendarExample.E_YEAR;
import static org.jsola.hr.example.AttendCalendarExample.M_ATTEND_PERIOD_JSON_MAX;
import static org.jsola.hr.example.AttendCalendarExample.M_ATTEND_PLAN_ID_MAX;
import static org.jsola.hr.example.AttendCalendarExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.AttendCalendarExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.AttendCalendarExample.M_DAY_MAX;
import static org.jsola.hr.example.AttendCalendarExample.M_MONTH_MAX;
import static org.jsola.hr.example.AttendCalendarExample.M_REASON_MAX;
import static org.jsola.hr.example.AttendCalendarExample.M_YEAR_MAX;
import static org.jsola.hr.example.AttendCalendarExample.N_ATTEND_PERIOD_JSON;
import static org.jsola.hr.example.AttendCalendarExample.N_ATTEND_PLAN_ID;
import static org.jsola.hr.example.AttendCalendarExample.N_COMPANY_ID;
import static org.jsola.hr.example.AttendCalendarExample.N_DATE_TYPE;
import static org.jsola.hr.example.AttendCalendarExample.N_DAY;
import static org.jsola.hr.example.AttendCalendarExample.N_MONTH;
import static org.jsola.hr.example.AttendCalendarExample.N_NEED_ATTEND;
import static org.jsola.hr.example.AttendCalendarExample.N_REASON;
import static org.jsola.hr.example.AttendCalendarExample.N_YEAR;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【考勤日历】的参数")
@Data
public class AttendCalendarUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_ATTEND_PLAN_ID, example = E_ATTEND_PLAN_ID)
    @Length(max = 32, message = M_ATTEND_PLAN_ID_MAX)
    private String attendPlanId;

    @ApiModelProperty(notes = N_YEAR, example = E_YEAR)
    @Length(max = 8, message = M_YEAR_MAX)
    private String year;

    @ApiModelProperty(notes = N_MONTH, example = E_MONTH)
    @Length(max = 8, message = M_MONTH_MAX)
    private String month;

    @ApiModelProperty(notes = N_DAY, example = E_DAY)
    @Length(max = 8, message = M_DAY_MAX)
    private String day;

    @ApiModelProperty(notes = N_DATE_TYPE, example = E_DATE_TYPE)
    private Integer dateType;

    @ApiModelProperty(notes = N_NEED_ATTEND, example = E_NEED_ATTEND)
    private Boolean needAttend;

    @ApiModelProperty(notes = N_ATTEND_PERIOD_JSON, example = E_ATTEND_PERIOD_JSON)
    @Length(max = 255, message = M_ATTEND_PERIOD_JSON_MAX)
    private String attendPeriodJson;

    @ApiModelProperty(notes = N_REASON, example = E_REASON)
    @Length(max = 255, message = M_REASON_MAX)
    private String reason;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

